package com.ma.workorder;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.ma.BR;
import com.ma.R;

import java.util.ArrayList;
import java.util.List;

import base.BaseListActivity;
import entity.Order;

public class TimeoutOrderActivity extends BaseListActivity<Order> {

    @Override
    protected int getLayoutId() {
        return R.layout.timeout_item;
    }

    @Override
    protected int getViewModelId() {
        return BR.timeoutBean;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        adapter.setOnItemClickListener((view, position) -> {
            startActivity(TimeoutOrderInfoActivity.class);

        });

    }

    @Override
    protected void onResume() {
        super.onResume();
        initData();
    }

    void initData() {

        List<Order> orders = new ArrayList<>();
        orders.add(new Order("空调短路", true, true, true, "英语“已解决”“处理中”“待处理”怎么表达?_百度知道", true, true, 3, "2017-07-08 10:10", "重庆市南岸区海 "));
        orders.add(new Order("空调短路", true, true, true, "海词词典,最权威的学习词典,专业出版待处理的英文,待处理翻译,待处理英语怎么说等详细讲解。海词词典:学习变容易,记忆很深刻。", true, true, 3, "2017-07-08 10:10", "重庆市南岸区海棠溪街道学府大道81号（七公里加油站对面）"));
        orders.add(new Order("空调短路", true, true, true, "待处理订单 Order in Suspense未处理订单 Unprocessed Order未发货订单 Goods Undelivered Order", true, true, 3, "2017-07-08 10:10", "重庆市南岸区海棠溪街道学府大道81号（七公里加油站对面）"));

        setData(orders);

    }
}